<%--
  Created by IntelliJ IDEA.
  User: yangwu
  Date: 2021/8/30
  Time: 17:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>头部</title>
    <link rel="stylesheet" href="/statics/css/bootstrap.css" />
</head>
<body>
    <div class="container-fluid" style="height: 100px;">
        <div class="row" style="background-color: cornflowerblue;">
            <div class="col-md-4">
                <h3 style="color: white;"><span class="glyphicon glyphicon-user"></span>员工信息管理系统</h3>
            </div>
            <div class="col-md-8"></div>
        </div>
        <div class="row" style="background-color: lightgray;">
            <div class="col-md-4">
                <p style="color: dimgray;margin-top: 5px;">
                    <span class="glyphicon glyphicon-time"></span>
                    <span id="time"></span>&emsp;
                    <span id="welcome">欢迎${user.realName}</span>&emsp;&emsp;
                    <a href="/user/logout" target="_parent">退出登录</a>
                </p>
            </div>
            <div class="col-md-3"></div>
            <div class="col-md-5">
                <p style="color: dimgray;margin-top: 5px;">
                    温馨提示：为了能正常浏览，请使用高版本浏览器（IE10+）
                </p>
            </div>
        </div>
    </div>
    <!--引入JavaScript的支持-->
    <script src="/statics/js/jquery-2.1.0.min.js"></script>
    <script>
        $(function (){
            function getTime(){
                var nowDate=new Date();
                var year=nowDate.getFullYear();
                var month=nowDate.getMonth();
                var date=nowDate.getDate();
                var hour=nowDate.getHours();
                var minute=nowDate.getMinutes();
                var second=nowDate.getSeconds();
                if(minute<10){
                    minute="0"+minute;
                }
                if(second<10){
                    second="0"+second;
                }
                return year+"年"+month+"月"+date+"日  "+hour+":"+minute+":"+second;
            }
            setInterval(function (){
                $("#time").text(getTime());
            },1);
            /*$("#welcome").text("欢迎，"+${realName});*/
        })
    </script>
</body>
</html>
